package net.dl.ss.domain;

import java.sql.Timestamp;

/**
 * @author yakovlev.yuriy@gmail.com
 * @since 12.8.2008
 */
public class Round {
	private Long id;
	private Long categoryId;
	private String name;
	private Timestamp time;
	private Integer rank;
	private int couplesNumber;
	private Integer minSuccCouples;
	private Integer maxSuccCouples;
	private Integer mode;
	private int passingScore;
	private int setsNumber;
	//private String danceOrder;
	//private String danceTime;
	private String finalDanceTime;
	private Integer reDance;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getCategoryId() {
		return categoryId;
	}
	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Timestamp getTime() {
		return time;
	}
	public void setTime(Timestamp time) {
		this.time = time;
	}
	public Integer getRank() {
		return rank;
	}
	public void setRank(Integer rank) {
		this.rank = rank;
	}
	public int getCouplesNumber() {
		return couplesNumber;
	}
	public void setCouplesNumber(int couplesNumber) {
		this.couplesNumber = couplesNumber;
	}
	public Integer getMinSuccCouples() {
		return minSuccCouples;
	}
	public void setMinSuccCouples(Integer minSuccCouples) {
		this.minSuccCouples = minSuccCouples;
	}
	public Integer getMaxSuccCouples() {
		return maxSuccCouples;
	}
	public void setMaxSuccCouples(Integer maxSuccCouples) {
		this.maxSuccCouples = maxSuccCouples;
	}
	public Integer getMode() {
		return mode;
	}
	public void setMode(Integer mode) {
		this.mode = mode;
	}
	public int getPassingScore() {
		return passingScore;
	}
	public void setPassingScore(int passingScore) {
		this.passingScore = passingScore;
	}
	public int getSetsNumber() {
		return setsNumber;
	}
	public void setSetsNumber(int setsNumber) {
		this.setsNumber = setsNumber;
	}
	/*public String getDanceOrder() {
		return danceOrder;
	}
	public void setDanceOrder(String danceOrder) {
		this.danceOrder = danceOrder;
	}
	public String getDanceTime() {
		return danceTime;
	}
	public void setDanceTime(String danceTime) {
		this.danceTime = danceTime;
	}*/
	public String getFinalDanceTime() {
		return finalDanceTime;
	}
	public void setFinalDanceTime(String finalDanceTime) {
		this.finalDanceTime = finalDanceTime;
	}
	public Integer getReDance() {
		return reDance;
	}
	public void setReDance(Integer reDance) {
		this.reDance = reDance;
	}

	public String toXML() {
		StringBuffer buffer = new StringBuffer();
		buffer.append("<round>");
		buffer.append("<id>" + id + "</id>");
		buffer.append("<categoryId>" + categoryId + "</categoryId>");
		buffer.append("<name>" + name + "</name>");
		buffer.append("<time>" + time + "</time>");
		buffer.append("<rank>" + rank + "</rank>");
		buffer.append("<couplesNumber>" + couplesNumber + "</couplesNumber>");
		buffer.append("<minSuccCouples>" + minSuccCouples + "</minSuccCouples>");
		buffer.append("<maxSuccCouples>" + maxSuccCouples + "</maxSuccCouples>");
		buffer.append("<mode>" + mode + "</mode>");
		buffer.append("<passingScore>" + passingScore + "</passingScore>");
		buffer.append("<setsNumber>" + setsNumber + "</setsNumber>");
		//buffer.append("<danceOrder>" + danceOrder + "</danceOrder>");
		//buffer.append("<danceTime>" + danceTime + "</danceTime>");
		buffer.append("<finalDanceTime>" + finalDanceTime + "</finalDanceTime>");
		buffer.append("<reDance>" + reDance + "</reDance>");
		buffer.append("</round>");
		return buffer.toString();
	}
	
}
